﻿#region using
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

using XmlGenSharp;
#endregion

namespace XmlGenSharp.Logic.Main
{
  public class TextFileGenerator : GeneratorBase
  {
    // Constructor

    #region TextFileGenerator()
    public TextFileGenerator()
      : this(null, "NotSpecified")
    {
    }
    #endregion

    #region TextFileGenerator(string inputFileName, string defaultNamespace)
    public TextFileGenerator(string inputFileName, string defaultNamespace) : base(inputFileName, defaultNamespace)
    {
    }
    #endregion

    // Public Properties

    #region OverwriteIfExists
    public override bool OverwriteIfExists
    {
      get
      {
        return true;
      }
    }
    #endregion

    #region Content
    public string Content
    {
      get;
      set;
    }
    #endregion

    // Public Methods

    #region GetFileName()
    public override string GetFileName()
    {
      return null;
    }
    #endregion

    #region GetExtension()
    public override string GetExtension()
    {
      return ".Generator.txt";
    }
    #endregion

    #region Generate(IGeneratorContext cx)
    public override void Generate(IGeneratorContext cx)
    {
      cx.W(Content);
    }
    #endregion
  }
}

